/**
 * 
 */
package br.gfca.simplenet.test.chat;

import br.gfca.simplenet.test.chat.ui.ClientServerMenu;
import br.gfca.simplenet.util.Printer;

/**
 * @author Gustavo
 * The entry point of Simple Chat application.
 */
public class SimpleChat {

	/**
	 * The entry point of Simple Chat application.
	 * @param args Parameters to configure application. Position
	 * 0 may have a "-debug" to make error messages and warnings
	 * flow over error output stream.
	 */
	public static void main(String[] args) {
		
		/* Gets the "-debug" parameter if any and
		 * initializes the error messages printer.
		 */
		Printer.createInstance( args != null && args.length > 0 && args[0].equals("-debug") );
		
		// Initializes the main window
		java.awt.EventQueue.invokeLater(new Runnable() {
			public void run() {
				new ClientServerMenu().setVisible(true);
			}
		});
	}
}